package com.yiwyn;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.yiwyn.domain.User;

// TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    public static void main(String[] args) throws JsonProcessingException {

        User user = new User();
        user.setUserGender("男");
        user.setUsername("测试");
        user.setUserId(123456);

        XmlMapper xmlMapper = new XmlMapper();

        String s = xmlMapper.writeValueAsString(user);

        System.out.println(s);

    }
}